@extends('admin_system/public/angular-layout')
<body ng-app="admin-app" ng-controller="readPartyController">
<div class="main-container">

    {{--顶部导航--}}
    <div class="col-xs-12 top-nav nav">
        <p class="float-left nav-path"><strong>当前位置：</strong>广告管理>>添加广告</p>

        {{--返回按钮--}}
        <button type="button" class="btn btn-default float-right back" aria-label="Left Align">
            <span class="glyphicon glyphicon-arrow-left back" aria-hidden="true"></span>
            <span>返回</span>
        </button>
    </div>

    <div class="h10 col-xs-12"></div>

    {{--正文内容--}}
    <table class="table table-bordered" style="max-width:600px;">
        <tr>
            <td>读书会名称</td>
            <td><input type="text" value="{{$readInfo->ReaParName}}" disabled class="form-control"></td>
        </tr>
        <tr>
            <td>打赏权限</td>
            <td>
                <select class="form-control" ng-model="member.rewardRight">
                    <option value="0">否</option>
                    <option value="1">是</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>选择用户</td>
            <td>
                <input id="userName" type="text" readonly class="form-control" placeholder="选择用户" onclick="show_list()">
                <input id="userId"  type="hidden">
            </td>
        </tr>
        <tr>
            <td colspan="2" class="text-center"> <span class="btn btn-danger" ng-click="add_single_member()">&nbsp;提&nbsp;交&nbsp;</span></td>
        </tr>
    </table>


    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:800px;min-height:80vh;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">选择用户</h4>
                </div>
                <iframe src="{{asset('admin_system/member/select_member?callback=callback&companyId='.$readInfo->company_id)}}" style="min-height:85vh;width:100%;"></iframe>
            </div>
        </div>
    </div>


</div>
</body>

<script>
    function callback(data){
        if(data &&　data.length > 0){
            data = data[0];
            $('#userId').val(data.id);
            $('#userName').val(data.name);
        }
        $('#myModal').modal('toggle');
    }

    function show_list(){
        $('#myModal').modal('toggle');
    }
</script>